package com.team.est.Controller;


import com.team.est.util.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.List;

@RestController
    public class TestController {

        //返回状态码和描述信息无数据
    /*@RequestMapping("/test")
    public Result test(){

        return new Result("1","添加成功");
    }*/

        //返回状态和描述及数据
        @RequestMapping("/test")
        public Result<List<String>> test(){
            List<String> names=Arrays.asList("张三","李四","麻子");

            return new Result("1","查询用户名",names);
        }

    }

